﻿<Window xmlns:my="clr-namespace:IsoStoreSpy.Plugins.Shared.Controls;assembly=IsoStoreSpy.Plugins.Shared"  x:Class="IsoStoreSpy.Plugins.SqlWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="SqlWindow" Height="458" Width="675" Icon="/IsoStoreSpy.Plugins;component/Logo.ico">
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>

        </Grid.RowDefinitions>

        <StackPanel>

            <TextBlock Text="Execute a sql request" Foreground="DarkGray" FontFamily="Segoe UI" FontSize="30"></TextBlock>
            <TextBlock Margin="10,5,10,5" Text="With this tool you could execute all queries permitted by SQL. If you execute NonQueries like Create, Insert, Delete or Update don't forget to upload the database before selecting an other file in the preview panel." TextWrapping="Wrap" Foreground="DarkGray" FontFamily="Segoe UI" ></TextBlock>

        </StackPanel>

        <TextBox FontSize="15" Margin="5,10,5,10" FontFamily="Segoe UI" Grid.Row="1" Text="{Binding SqlRequest, Mode=TwoWay}" TextWrapping="Wrap" Height="100" AcceptsReturn="True" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" BorderThickness="1" BorderBrush="LightGray" />

            <Grid Grid.Row="2" Margin="5" >
                <TextBlock FontFamily="Segoe UI" Foreground="DarkGray" FontSize="15" Margin="5,0,5,0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding ResultCountString}"></TextBlock>
                <my:MetroButton HorizontalAlignment="Right" Content="Execute" Margin="5,0,5,0" Click="ExecuteSql_Click" IconSource="/IsoStoreSpy.Plugins;component/Images/Play.png" />
            </Grid>
        
        <ListView x:Name="ListView" Grid.Row="3" Margin="5" BorderThickness="1" BorderBrush="LightGray" FontFamily="Segoe UI" FontSize="15">
            <ListView.View>
                <GridView x:Name="GridView">                                    
                </GridView>
            </ListView.View>
        </ListView>

    </Grid>
</Window>
